package com.teemor.blog.config;

import org.apache.commons.beanutils.ConvertUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;

/**
 * @Description:
 * @author zhoulk
 * @date: 2019/9/17
 */
@Component
public class DmsConfigs {

    @Value("${biz.cleanacct.online.mchtIds}")
    private List<String> clearAcctMchtIds = new ArrayList<>();
    @Value("${biz.cleanacct.online.mchtIds}")
    private String[] clearAcctMchtIdstr;

    private Long[] clearAcctMchtIdlongs;

    @Value("${biz.cleanacct.online.mchtIds}")
    public void setClearAcctMchtIdlongs(String[] ids) {
        this.clearAcctMchtIdlongs = (Long[]) ConvertUtils.convert(ids, Long.class);
    }
}
